// 用户所有数据
let arr2 = [
    {
        isAdmin: false,
        _id: '5fd04428f8622a06d4ca8d2a',
        username: 'xxxxd',
        password: 'ddd',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd04551a193cd0570c0dec8',
        username: 'addd',
        password: 'xxx',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd04665dba7c109442d6e11',
        username: 'addds',
        password: 'xxx',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd04691dba7c109442d6e12',
        username: 'adddsaa',
        password: 'xxx',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd066f1c0ed334030545059',
        username: '李',
        password: '123',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd0678478afb745288b5268',
        username: 'aaa',
        password: 'a',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd06a7078afb745288b5269',
        username: 'ttt',
        password: 'ttt',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd06cc978afb745288b526a',
        username: 'bjk',
        password: '123',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd06dde78afb745288b526b',
        username: '王建涛',
        password: '123456',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd0702a78afb745288b526c',
        username: 'aaaa',
        password: 'aaaa',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd070ed78afb745288b526d',
        username: '外圈父',
        password: '123456',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd072d578afb745288b526e',
        username: 'qwe',
        password: 'qwe',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd0731278afb745288b526f',
        username: '梵蒂冈',
        password: '123456',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd0742e78afb745288b5270',
        username: 'zxc',
        password: 'aaa',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd076da78afb745288b5271',
        username: '1111',
        password: '123',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd07cec78afb745288b5272',
        username: 'rbtl',
        password: 'rbtl',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd07d4578afb745288b5273',
        username: 'www',
        password: 'www',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd07d8478afb745288b5274',
        username: 'qqq',
        password: 'qqq',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd07d8d78afb745288b5275',
        username: 'eee',
        password: 'eee',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd07de778afb745288b5276',
        username: 'wwwq',
        password: '121212',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd07e0c78afb745288b5277',
        username: 'adminaaa',
        password: '123',
        __v: 0
    },
    {
        isAdmin: true,
        _id: '5fd17520bc050000500033f2',
        username: 'admin',
        password: '123',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd1b9439efaa240840dd755',
        username: 'java',
        password: '121212',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd308f2e01fb51728738385',
        username: 'dddd',
        password: 'dddd',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd6b7ece317ee2b340661c1',
        username: 'aaaaa',
        password: 'aaa',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fd850556dbfa30d200d73fa',
        username: 'abcd',
        password: 'aaa',
        __v: 0
    },
    {
        isAdmin: false,
        _id: '5fdafc9b0490eb3568462016',
        username: 'rrr',
        password: 'rrr',
        __v: 0
    }
]
// 文章所有数据
let arr1 = [
    {
        read: 0,
        time: 1608186214310,
        _id: '5fdaf98a30099302c477e08a',
        author: '5fd17520bc050000500033f2',
        type: '5fd9839c10291d3680c1b6df',
        title: 'html的使用规范',
        content: '内容啊啊啊啊123123132'
    },
    {
        read: 0,
        time: 1608186572588,
        _id: '5fdafaf30490eb3568462014',
        title: '123123',
        type: '5fd9838110291d3680c1b6dd',
        content: 'asdasfasdf',
        author: '5fd17520bc050000500033f2'
    },
    {
        read: 0,
        time: 1608186572588,
        _id: '5fdafb4b0490eb3568462015',
        title: 'CSS海市蜃楼效果',
        type: '5fd9838110291d3680c1b6dd',
        content: '请看下集',
        author: '5fd17520bc050000500033f2'
    },
    {
        read: 0,
        time: 1608186572588,
        _id: '5fdafd050490eb3568462017',
        title: '我是rrr',
        type: '5fd9838110291d3680c1b6dd',
        content: 'xxx',
        author: '5fdafc9b0490eb3568462016'
    },
    {
        read: 0,
        time: 1608186572588,
        _id: '5fdafd1e0490eb3568462018',
        title: 'rrr:添加1',
        type: '5fd9839c10291d3680c1b6df',
        content: '啊打发',
        author: '5fdafc9b0490eb3568462016'
    },
    {
        read: 0,
        time: 1608186572588,
        _id: '5fdafd360490eb3568462019',
        title: 'rrr:添加2',
        type: '5fd9839c10291d3680c1b6df',
        content: '阿斯顿发生的发生的发十大发生的发生的发阿斯顿发暗室逢灯阿斯顿发暗室逢灯阿斯顿发暗室逢灯啊发生大幅度阿凡达阿斯顿发安抚安抚阿斯顿发安抚安抚安抚安抚安抚安抚啊发啊发送到发阿斯顿发打都打发飞',
        author: '5fdafc9b0490eb3568462016'
    }
]
function dataSplitting(arr1,arr2){
    let newData = [];
    for (let i = 0; i < arr1.length; i++) {
        let adom = arr2.find(item => item._id == arr1[i].author);
        newData.push({...arr1[i],author:adom.username})
    }
    return newData;
}
console.log(dataSplitting(arr1,arr2));